<template>
    <div>
        <h4>修改员工信息</h4>
        姓名：{{employee.name}}<br>
        电话：<input type="text" v-model="employee.tel"><br>
        职位：{{employee.job}}<br>
        生日：{{employee.birthday}}<br>
        头像：<img :src="'/project/html/image/'+employee.faceImg" width="200" height="200"><br>
        <input type="button" value="修改" @click="updateTel">
    </div>
</template> 

<script>
export default {
    props:["employee"],
    methods:{
        async updateTel(){
            var info = await this.ajax.getSubmit("/project/employee/update",{id:this.employee.id,tel:this.employee.tel});
            if(info == "ok"){
                this.$emit("page",{pageNO:1});
                alert("修改成功");
            }
            else{
                alert("修改失败");
            }
        }
    }
}
</script>

<style>

</style>